﻿




using System.Collections.Generic;
using System.Linq;
using Hotpot.Models;

namespace Hotpot.Repositories.SqlServer
{
    public class SqlServerLocalizationRepository : ILocalizationRepository
    {
        private readonly HotpotDataContext context;

        public SqlServerLocalizationRepository(HotpotDataContext context)
        {
            this.context = context;
        }

        #region ILocalizationRepository Members

        public IEnumerable<Phrase> GetPhrases()
        {
            return context.hotpot_StringResources.Select(r => new Phrase(r.StringResourceKey, r.StringResourceValue, r.Language)).ToArray();
        }

        #endregion
    }
}
